package com.taysear.parcel.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@SuppressWarnings("serial")
@Entity
@Table(name="loadingsheet_history")
public class LoadingsheetHistory implements Serializable{

	@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer loadingsheetHistoryId;
	@OneToOne(fetch=FetchType.LAZY) @JoinColumn(name="loadingsheet")
	private Loadingsheet loadingsheet;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="user")
	private User user;
	@Temporal(TemporalType.TIMESTAMP) 
	private Date date;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="loadingsheetAction")
	private LoadingsheetAction loadingsheetAction;
	private String description;
	
	public Integer getLoadingsheetHistoryId() {
		return loadingsheetHistoryId;
	}
	public void setLoadingsheetHistoryId(Integer loadingsheetHistoryId) {
		this.loadingsheetHistoryId = loadingsheetHistoryId;
	}
	public Loadingsheet getLoadingsheet() {
		return loadingsheet;
	}
	public void setLoadingsheet(Loadingsheet loadingsheet) {
		this.loadingsheet = loadingsheet;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public LoadingsheetAction getLoadingsheetAction() {
		return loadingsheetAction;
	}
	public void setLoadingsheetAction(LoadingsheetAction loadingsheetAction) {
		this.loadingsheetAction = loadingsheetAction;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
}
